package com.wjf.accesscontrol

import android.os.Bundle
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import com.wjf.accesscontrol.utils.SdkUtils

class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        val btnConnect = findViewById<TextView>(R.id.btn_connect)
        val btnDisconnected = findViewById<TextView>(R.id.btn_disconnected)
        val btnReadId = findViewById<TextView>(R.id.btn_read_id)

        SdkUtils.instance.setUsbPermission(this)

        btnConnect.setOnClickListener {
            SdkUtils.instance.connectDevice()
        }
        btnDisconnected.setOnClickListener {
            SdkUtils.instance.disconnected()
        }

        btnReadId.setOnClickListener {
            //todo wjf 测试
        }


    }


}